package com.zdp.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表;
 * </p>
 *
 * @author sesshomaru
 * @since 2021-08-01
 */
@TableName("orders")
public class Orders implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 订单主键
     * AUTO 数据库自增ID
     * NONE 数据库未设置主键类型（将会跟随全局）
     * INPUT 用户输入ID（该类型可以通过自己注册自动填充插件进行填充）
     * ID_WORKER 全局唯一ID (idWorker)
     * UUID 全局唯一ID（UUID）
     * ID_WORKER_STR 字符串全局唯一ID（idWorker 的字符串表示）
     */
    @TableId(value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 商户订单号
     */
    private String merchantOrderId;

    /**
     * 商户方的发起用户的用户主键id
     */
    private String merchantUserId;

    /**
     * 实际支付总金额（包含商户所支付的订单费邮费总额）
     */
    private Integer amount;

    /**
     * 支付方式
     */
    private Integer payMethod;

    /**
     * 支付状态 10：未支付 20：已支付 30：支付失败 40：已退款
     */
    private Integer payStatus;

    /**
     * 从哪一端来的，比如从天天吃货这门实战过来的
     */
    private String comeFrom;

    /**
     * 支付成功后的通知地址，这个是开发者那一段的，不是第三方支付通知的地址
     */
    private String returnUrl;

    /**
     * 逻辑删除状态;1: 删除 0:未删除
     */
    private Integer isDelete;

    /**
     * 创建时间（成交时间）
     */
    private LocalDateTime createdTime;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMerchantOrderId() {
        return merchantOrderId;
    }

    public void setMerchantOrderId(String merchantOrderId) {
        this.merchantOrderId = merchantOrderId;
    }

    public String getMerchantUserId() {
        return merchantUserId;
    }

    public void setMerchantUserId(String merchantUserId) {
        this.merchantUserId = merchantUserId;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(Integer payMethod) {
        this.payMethod = payMethod;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public String getComeFrom() {
        return comeFrom;
    }

    public void setComeFrom(String comeFrom) {
        this.comeFrom = comeFrom;
    }

    public String getReturnUrl() {
        return returnUrl;
    }

    public void setReturnUrl(String returnUrl) {
        this.returnUrl = returnUrl;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    @Override
    public String toString() {
        return "Orders{" +
        "id=" + id +
        ", merchantOrderId=" + merchantOrderId +
        ", merchantUserId=" + merchantUserId +
        ", amount=" + amount +
        ", payMethod=" + payMethod +
        ", payStatus=" + payStatus +
        ", comeFrom=" + comeFrom +
        ", returnUrl=" + returnUrl +
        ", isDelete=" + isDelete +
        ", createdTime=" + createdTime +
        "}";
    }
}
